package io.sage.modules.exam.enums;

/**
 * 
 * @author xujh
 *
 */
public enum ExamEnum {
    //0--启用状态.  1--停用状态.
    //新增是默认状态为0：启用状态.
    NOTRESULT(0,"正常"),
    PARTYCOMPLET(1,"停用");

    private Integer code;
    private String message;
    
    
    /**
     * 根据code获取message
     * @param code
     * @return
     */
    public static String getMessage(Integer code){
        for (ExamEnum examEnum : ExamEnum.values()){
            if (code.equals(examEnum.getCode()) || code == examEnum.getCode()){
                return examEnum.getMessage();
            }
        }
        return null;
    }
    
	private ExamEnum(Integer code, String message) {
		this.code = code;
		this.message = message;
	}
	public Integer getCode() {
		return code;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}

}
